import { useContext } from "react";
import { TodoCtx } from "./useTodo";

export default function Foo() {
  let { todoState, todoFn } = useContext(TodoCtx);

  return (
    <div style={{border:"solid"}}>
      <div>深深太平洋底 深深组件，探测到todo项目个数为： {todoState.todoList.length}</div>
      <button onClick={() => todoFn.addTodo$()}>也能执行添加</button>
    </div>
  );
}
